import { RedditOutlined } from '@ant-design/icons';
import { history } from '@umijs/max';
import type { FC } from 'react';
import AvatarDropdown from '../User/AvatarDropdown';
import styles from './index.less';

interface TopHeaderProps {
  children?: React.ReactNode;
}

const TopHeader: FC<TopHeaderProps> = () => {
  return (
    <div className={styles.topHeader_wrap}>
      <div
        className={styles.header_left}
        onClick={() => history.push('/cache/home')}
      >
        <RedditOutlined style={{ fontSize: 24, color: '#6743D5' }} />
        <span className={styles.header_left_title}>umi4-template</span>
      </div>
      <div className={styles.header_right}>
        <AvatarDropdown />
      </div>
    </div>
  );
};

export default TopHeader;
